﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data.SqlClient;


public struct YearActivity : IBusinessEntity
{
    private string _year;

    public string Year
    {
        get { return _year; }
        set { _year = value; }
    }


    #region IBusinessEntity Members

    public void Fill(SqlDataReader reader)
    {
        _year = reader.GetInt32(0).ToString();   
    }

    #endregion
}
/// <summary>
/// Summary description for DALReport
/// </summary>
/// 
[System.ComponentModel.DataObject]
public class DALReport
{
    public static List<YearActivity> ListYearActivity()
    {
        return DAL.GetDataItems<YearActivity>(SQL.getYearActiveCompany, new string[] { }, new object[] { });       
    }

    public static List<StockInfo> ListStock()
    {
        List<StockInfo> stockInfos = DAL.GetDataItems<StockInfo>(SQL.BranchInformation, new string[] { }, new object[] { });
        StockInfo temp = new StockInfo();
        temp.PinCode = String.Empty;
        temp.BranchName = "All Branches";
        stockInfos.Add(temp);
        return stockInfos;
    }
    
}
